package com.wx.app.card.utils;

import com.wx.app.card.domain.vo.Result;

/**
 * 类功能描述：
 *
 * @author：刘富国
 * @createTime：2019/7/30 19:53
 */
public class ResultUtils {

    public static Result success(Object object) {
        Result result = new Result();
        result.setCode(0);
        result.setMsg("成功");
        result.setData(object);
        return result;
    }

    public static Result success() {
        return success(null);
    }

    public static Result fail(String msg) {
        Result result = new Result();
        result.setCode(1);
        result.setMsg(msg);
        return result;
    }
}
